package com.sos.repository;

import com.sos.model.entity.RescueRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RescueRecordRepository extends JpaRepository<RescueRecord, Long> {
    /**
     * 根据SOS ID查找救援记录
     */
    List<RescueRecord> findBySosId(Long sosId);
    
    /**
     * 根据SOS ID和帮助者ID查找救援记录
     */
    List<RescueRecord> findBySosIdAndHelperId(Long sosId, Long helperId);
}